Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
struct System.​Numerics.​TotalOrderIeee754Comparer<​T>
Assembly: System.Runtime
Implemented Interfaces
- Collections.​Generic.​IComparer`1
- Collections.​Generic.​IEqualityComparer`1
- IEquatable`1
Represents a comparison operation that compares floating-point numbers with IEEE 754 totalOrder semantic.
Methods
public
int
Compare​(T x,
T y)
Compares two numbers with IEEE 754 totalOrder semantic and returns a value indicating whether one is less than, equal to, or greater than the other.
Returns A signed integer that indicates the relative values of <paramref name="x" /> and <paramref name="y" /> , as shown in the following table.
<list type="table">
<listheader>
<term> Value</term>
<description> Meaning</description>
</listheader>
<item>
<term> Less than zero</term>
<description>
<paramref name="x" /> is less than <paramref name="y" /></description>
</item>
<item>
<term> Zero</term>
<description>
<paramref name="x" /> equals <paramref name="y" /></description>
</item>
<item>
<term> Greater than zero</term>
<description>
<paramref name="x" /> is greater than <paramref name="y" /></description>
</item>
</list>
x
The first number to compare.
y
The second number to compare.
public
bool
Equals​(TotalOrderIeee754Comparer<​T> other)
Indicates whether the current object is equal to another object of the same type.
Returns <see langword="true" /> if the current object is equal to the <paramref name="other" /> parameter; otherwise, <see langword="false" /> .
other
An object to compare with this object.
public
bool
Equals​(object obj)
Determines whether this instance and a specified object are equal.
Returns <see langword="true" /> if the current instance and <paramref name="obj" /> are equal; otherwise, <see langword="false" /> . If <paramref name="obj" /> is <see langword="null" /> , the method returns <see langword="false" /> .
obj
The object to compare with the current instance.
public
bool
Equals​(T x,
T y)
Determines whether the specified numbers are equal.
Returns <see langword="true" /> if the specified numbers are equal; otherwise, <see langword="false" /> .
x
The first number of type <typeparamref name="T" /> to compare.
y
The second number of type <typeparamref name="T" /> to compare.
public
int
GetHashCode​()
Returns the hash code for this instance.
Returns The hash code.
public
int
GetHashCode​(T obj)
Returns a hash code for the specified number.
Returns A hash code for the specified number.
obj
The number for which a hash code is to be returned.
public
string
ToString​()
Inherited from ValueType
Returns the fully qualified type name of this instance.
Returns The fully qualified type name.
protected
void
Finalize​()
Inherited from object
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
public
Type
GetType​()
Inherited from object
Gets the <see cref="T:System.Type" /> of the current instance.
Returns The exact runtime type of the current instance.
protected
object
MemberwiseClone​()
Inherited from object
Creates a shallow copy of the current <see cref="T:System.Object" /> .
Returns A shallow copy of the current <see cref="T:System.Object" /> .